module.exports = options => {
    return async function state(ctx, next) {
        ctx.state.csrf = ctx.csrf // 全局变量
        ctx.state.pathname = options.pathname
        await next()
    };
};